package SwingView;

import javax.swing.*;

import SwingView.Announcement.CmsCPInstructorAnnouncement;
import SwingView.Announcement.CmsCPStudentAnnouncement;
import SwingView.Assignment.CmsCPAsgmComposer;
import SwingView.Assignment.CmsCPAsgmEdit;
import SwingView.Assignment.CmsCPAsgmMainInstructor;
import SwingView.Assignment.CmsCPAsgmMainStudent;
import SwingView.Assignment.CmsCPAsgmSubmissionView;
import SwingView.Assignment.CmsCPAsgmViewInstructor;
import SwingView.Assignment.CmsCPAsgmViewStudent;
import SwingView.Gradebook.CmsCPInstructorGradebook;
import SwingView.Gradebook.CmsCPStudentGradebook;
import SwingView.Lecture.CmsCPInstructorLecture;
import SwingView.Lecture.CmsCPStudentLecture;
import SwingView.Message.CmsCPMessage;
import SwingView.Quiz.CmsCPQuizEdit;
import SwingView.Quiz.CmsCPQuizMainInstructor;
import SwingView.Quiz.CmsCPQuizComposer;
import SwingView.Quiz.CmsCPQuizResult;
import SwingView.Quiz.CmsCPQuizSubmissions;
import SwingView.Quiz.CmsCPQuizTake;
import SwingView.Quiz.CmsCPQuizView;
import SwingView.Quiz.CmsCPQuizMainStudent;

import java.awt.*;
import java.util.List;

public class CmsContentPanel extends CmsContentPanelModel {
	
	public static final String CARD_HOME_PAGE = "CMS_HOME_PAGE";
	
	public static final String CARD_COURSE_PAGE = "CMS_COURSE_PAGE";
	
	public static final String CARD_MESSAGE_PAGE = "CMS_MESSAGE_PAGE";
	
	public static final String CARD_PEOPLE_PAGE = "CMS_PEOPLE_PAGE";
	
	public static final String CARD_STUDENT_ANNOUNCEMENT_PAGE = "CMS_STUDENT_ANNNOUNCEMENT_PAGE";
	public static final String CARD_INSTRUCTOR_ANNOUNCEMENT_PAGE = "CMS_INSTRUCTOR_ANNNOUNCEMENT_PAGE";
	
	public static final String CARD_QUIZ_MAIN_STUDENT_PAGE = "CARD_QUIZ_MAIN_STUDENT_PAGE";
	public static final String CARD_QUIZ_MAIN_INSTRUCTOR_PAGE = "CARD_QUIZ_MAIN_INSTRUCTOR_PAGE";
	public static final String CARD_QUIZ_COMPOSER_PAGE = "CARD_QUIZ_COMPOSER_PAGE";
	public static final String CARD_QUIZ_EDIT_PAGE = "CARD_QUIZ_EDIT_PAGE";
	public static final String CARD_QUIZ_SUBMISSIONS_PAGE = "CARD_QUIZ_SUBMISSIONS_PAGE";
	public static final String CARD_QUIZ_TAKE_PAGE = "CARD_QUIZ_TAKE_PAGE";
	public static final String CARD_QUIZ_VIEW_PAGE = "CARD_QUIZ_VIEW_PAGE";
	public static final String CARD_QUIZ_RESULT_PAGE = "CARD_QUIZ_RESULT_PAGE";
	
	public static final String CARD_ASGM_MAIN_STUDENT_PAGE = "CARD_ASGM_MAIN_STUDENT_PAGE";
	public static final String CARD_ASGM_MAIN_INSTRUCTOR_PAGE = "CARD_ASGM_MAIN_INSTRUCTOR_PAGE";
	public static final String CARD_ASGM_COMPOSER_PAGE = "CARD_ASGM_COMPOSER_PAGE";
	public static final String CARD_ASGM_EDIT_PAGE = "CARD_ASGM_EDIT_PAGE";
	public static final String CARD_ASGM_VIEW_INSTRUCTOR_PAGE = "CARD_ASGM_VIEW_INSTRUCTOR_PAGE";
	public static final String CARD_ASGM_VIEW_STUDENT_PAGE = "CARD_ASGM_VIEW_STUDENT_PAGE";
	public static final String CARD_ASGM_SUBMISSION_VIEW_PAGE = "CARD_ASGM_SUBMISSION_VIEW_PAGE";
	
	public static final String CARD_STUDENT_GRADEBOOK_PAGE = "CMS_STUDENT_GRADEBOOK_PAGE";
	public static final String CARD_INSTRUCTOR_GRADEBOOK_PAGE = "CMS_INSTRUCTOR_GRADEBOOK_PAGE";
	
	public static final String CARD_STUDENT_LECTURE_PAGE = "CMS_STUDENT_LECTURE_MATERIAL_PAGE";
	public static final String CARD_INSTRUCTOR_LECTURE_PAGE = "CMS_INSTRUCTOR_LECTURE_MATERIAL_PAGE";
	
	
	//The content panels:
	private final CmsCPHome homePage;

	//Course Page
	private final CmsCPCourse coursePage;
	
	//People Page
	private final CmsCPPeople peoplePage;
	
	//Message Page
	private final CmsCPMessage messagePage;
	
	//Lecture Page
	private final CmsCPStudentLecture lectureStudentPage;
	private final CmsCPInstructorLecture lectureInstructorPage;
	
	//Gradebook Page
	private final CmsCPStudentGradebook gbStudentPage;
	private final CmsCPInstructorGradebook gbInstructorPage;
	
	//Assignment Page
	private final CmsCPAsgmMainStudent asgmMainStudentPage;
	private final CmsCPAsgmMainInstructor asgmMainInstructorPage;
	private final CmsCPAsgmComposer asgmComposerPage;
	private final CmsCPAsgmEdit asgmEditPage;

	private final CmsCPAsgmSubmissionView asgmSubmissionPage;
	private final CmsCPAsgmViewInstructor asgmViewInstructorPage;
	private final CmsCPAsgmViewStudent asgmViewStudentPage;
	
	//Quiz Page
	private final CmsCPQuizMainStudent quizMainStudentPage;
	private final CmsCPQuizMainInstructor quizMainInstructorPage;
	private final CmsCPQuizComposer quizComposerPage;
	private final CmsCPQuizEdit quizEditPage;
	private final CmsCPQuizView quizViewPage;
	private final CmsCPQuizSubmissions quizSubmissionsPage;
	private final CmsCPQuizTake quizTakePage;
	private final CmsCPQuizResult quizResultPage;
	
	//Announcement Page
	private final CmsCPStudentAnnouncement anmStudentPage;
	private final CmsCPInstructorAnnouncement anmInstructorPage;





	
	
	//---------------------------------------------------------
	//CONSTRUCTOR:
	//---------------------------------------------------------	
	public CmsContentPanel(){
		setOpaque(false);
		setForeground(Color.WHITE);
		setLayout(new CardLayout());
		
		//Home Page:
		homePage = new CmsCPHome();
		add(homePage,CARD_HOME_PAGE);
		
		//Course Page
		coursePage = new CmsCPCourse();
		add(coursePage,CARD_COURSE_PAGE);
		
		//People Page
		peoplePage = new CmsCPPeople();
		add(peoplePage,CARD_PEOPLE_PAGE);
		
		//Lecture Page
		lectureStudentPage = new CmsCPStudentLecture();
		lectureInstructorPage = new CmsCPInstructorLecture();
		add(lectureInstructorPage,CARD_INSTRUCTOR_LECTURE_PAGE);
		add(lectureStudentPage,CARD_STUDENT_LECTURE_PAGE);
		
		//Gradebook Page
		gbStudentPage = new CmsCPStudentGradebook();
		gbInstructorPage = new CmsCPInstructorGradebook();
		add(gbStudentPage,CARD_STUDENT_GRADEBOOK_PAGE);
		add(gbInstructorPage,CARD_INSTRUCTOR_GRADEBOOK_PAGE);
		
		//Message Page
		messagePage = new CmsCPMessage();
		add(messagePage,CARD_MESSAGE_PAGE);
		
		//Assignment Page
		asgmComposerPage = new CmsCPAsgmComposer();
		asgmMainStudentPage = new CmsCPAsgmMainStudent();
		asgmMainInstructorPage = new CmsCPAsgmMainInstructor();
		asgmEditPage = new CmsCPAsgmEdit();
		asgmSubmissionPage = new CmsCPAsgmSubmissionView();
		asgmViewInstructorPage = new CmsCPAsgmViewInstructor();
		asgmViewStudentPage = new CmsCPAsgmViewStudent();
		add(asgmMainStudentPage,CARD_ASGM_MAIN_STUDENT_PAGE);
		add(asgmMainInstructorPage,CARD_ASGM_MAIN_INSTRUCTOR_PAGE);
		add(asgmComposerPage, CARD_ASGM_COMPOSER_PAGE);
		add(asgmEditPage, CARD_ASGM_EDIT_PAGE);
		add(asgmSubmissionPage, CARD_ASGM_SUBMISSION_VIEW_PAGE);
		add(asgmViewInstructorPage, CARD_ASGM_VIEW_INSTRUCTOR_PAGE);
		add(asgmViewStudentPage, CARD_ASGM_VIEW_STUDENT_PAGE);
		
		//Quiz Page
		quizMainStudentPage = new CmsCPQuizMainStudent();
		quizMainInstructorPage = new CmsCPQuizMainInstructor();
		quizComposerPage = new CmsCPQuizComposer();
		quizEditPage = new CmsCPQuizEdit();
		quizViewPage = new CmsCPQuizView();
		quizSubmissionsPage = new CmsCPQuizSubmissions();
		quizTakePage = new CmsCPQuizTake();
		quizResultPage = new CmsCPQuizResult();
		add(quizMainStudentPage,CARD_QUIZ_MAIN_STUDENT_PAGE);
		add(quizMainInstructorPage,CARD_QUIZ_MAIN_INSTRUCTOR_PAGE);
		add(quizComposerPage,CARD_QUIZ_COMPOSER_PAGE);
		add(quizEditPage,CARD_QUIZ_EDIT_PAGE);
		add(quizViewPage,CARD_QUIZ_VIEW_PAGE);
		add(quizSubmissionsPage,CARD_QUIZ_SUBMISSIONS_PAGE);
		add(quizTakePage,CARD_QUIZ_TAKE_PAGE);
		add(quizResultPage,CARD_QUIZ_RESULT_PAGE);
		
		//Announcement Page
		anmStudentPage = new CmsCPStudentAnnouncement();
		anmInstructorPage = new CmsCPInstructorAnnouncement();
		add(anmStudentPage,CARD_STUDENT_ANNOUNCEMENT_PAGE);
		add(anmInstructorPage,CARD_INSTRUCTOR_ANNOUNCEMENT_PAGE);
	}

	//---------------------------------------------------------
	//GETTER METHODS:
	//---------------------------------------------------------
	
	/**
	 * @return the homePage
	 */
	public CmsCPHome getHomePage() {
		return homePage;
	}


	/**
	 * @return the coursePage
	 */
	public CmsCPCourse getCoursePage() {
		return coursePage;
	}


	/**
	 * @return the peoplePage
	 */
	public CmsCPPeople getPeoplePage() {
		return peoplePage;
	}


	/**
	 * @return the messagePage
	 */
	public CmsCPMessage getMessagePage() {
		return messagePage;
	}


	/**
	 * @return the lectureStudentPage
	 */
	public CmsCPStudentLecture getLectureStudentPage() {
		return lectureStudentPage;
	}


	/**
	 * @return the lectureInstructorPage
	 */
	public CmsCPInstructorLecture getLectureInstructorPage() {
		return lectureInstructorPage;
	}


	/**
	 * @return the gbStudentPage
	 */
	public CmsCPStudentGradebook getGbStudentPage() {
		return gbStudentPage;
	}


	/**
	 * @return the gbInstructorPage
	 */
	public CmsCPInstructorGradebook getGbInstructorPage() {
		return gbInstructorPage;
	}


	//QUIZ GETTERS:
	public CmsCPQuizMainStudent getQuizMainStudentPage() {
		return quizMainStudentPage;
	}
	public CmsCPQuizMainInstructor getQuizMainInstructorPage() {
		return quizMainInstructorPage;
	}

	public CmsCPQuizComposer getQuizComposerPage(){
		return quizComposerPage;
	}
	public CmsCPQuizEdit getQuizEditPage() {
		return quizEditPage;
	}

	public CmsCPQuizView getQuizViewPage() {
		return quizViewPage;
	}

	public CmsCPQuizSubmissions getQuizSubmissionsPage() {
		return quizSubmissionsPage;
	}

	public CmsCPQuizTake getQuizTakePage() {
		return quizTakePage;
	}

	public CmsCPQuizResult getQuizResultPage() {
		return quizResultPage;
	}
	
	

	/**
	 * @return the anmStudentPage
	 */
	public CmsCPStudentAnnouncement getAnmStudentPage() {
		return anmStudentPage;
	}


	/**
	 * @return the anmInstructorPage
	 */
	public CmsCPInstructorAnnouncement getAnmInstructorPage() {
		return anmInstructorPage;
	}
	

	//ASSIGNMENT GETTERS:
	public CmsCPAsgmMainStudent getAsgmMainStudentPage() {
		return asgmMainStudentPage;
	}
	public CmsCPAsgmMainInstructor getAsgmMainInstructorPage() {
		return asgmMainInstructorPage;
	}
	public CmsCPAsgmComposer getAsgmComposerPage(){
		return asgmComposerPage;
	}
	public CmsCPAsgmEdit getAsgmEditPage() {
		return asgmEditPage;
	}
	public CmsCPAsgmSubmissionView getAsgmSubmissionPage() {
		return asgmSubmissionPage;
	}
	public CmsCPAsgmViewInstructor getAsgmViewInstructorPage() {
		return asgmViewInstructorPage;
	}
	public CmsCPAsgmViewStudent getAsgmViewStudentPage() {
		return asgmViewStudentPage;
	}
	
	
}
